package com.dtwave.cfstreaming.sink.function;

import com.dtwave.cfstreaming.bean.ResultData;

import org.apache.flink.api.common.functions.RichFlatMapFunction;
import org.apache.flink.api.java.tuple.Tuple2;
import org.apache.flink.util.Collector;


public class SinkFlatMap extends RichFlatMapFunction<Tuple2<Boolean, ResultData>,ResultData> {

    @Override
    public void flatMap(Tuple2<Boolean, ResultData> tup, Collector<ResultData> collector) throws Exception {
        if(tup.f0){
            collector.collect(tup.f1);
        }
    }
}
